Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
var utils = require('map-utils');
utils.exists(null); // false
utils.exists(undefined); // false
utils.exists('foo'); // true
var utils = require('map-utils');
var arr = [
{
foo: 1,
bar: 1,
qux: 1
},
{
foo: 2,
bar: 2,
qux: 2
}
];
arr.map(utils.pick('foo', 'bar'));
/*
[
{
foo: 1,
bar: 1
},
{
foo: 2,
bar: 2
}
]
*/
var utils = require('map-utils');
var arr = [
{
foo: 1,
bar: 1,
qux: 1
},
{
foo: 2,
bar: 2,
qux: 2
}
];
arr.map(utils.omit('foo', 'bar'));
/*
[
{
qux: 1
},
{
qux: 2
}
]
*/
var utils = require('map-utils');
var arr = [
{
foo: 1,
bar: 1,
qux: 1
},
{
foo: 2,
bar: 2,
qux: 2
}
];
arr.map(utils.pluck('foo')); // [1, 2]
var utils = require('map-utils');
var arr1 = [
{
foo: 1,
bar: 1
},
{
foo: 2,
bar: 1
}
];
var arr2 = [
{
foo: 1
},
{
foo: 2
}
];
arr1.map(utils.set('qux', 1));
arr2.map(utils.set({ bar:1, qux:1 }));
/* both arr and arr2 becom:
[
{
foo: 1,
bar: 1,
qux: 1
},
{
foo: 2,
bar: 1,
qux: 1
}
]
*/
var utils = require('map-utils');
var arr = [
{
foo: 1,
bar: 1,
qux: 1
},
{
foo: 2,
bar: 2,
qux: 2
}
];
arr.map(utils.unset('foo', 'bar'));
/* arr becomes:
[
{
foo: 1,
bar: 1
},
{
foo: 2,
bar: 2
}
]
*/
FAQs
map util functions, map, utils, pick, pluck, set, exists
The npm package map-utils receives a total of 5 weekly downloads. As such, map-utils popularity was classified as not popular.
We found that map-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.